using System;
using System.Data;
using GoodsInvoicing.BLL.Service;
using GoodsInvoicing.DAL.DAO;
using GoodsInvoicing.Model.Menu;
using System.Collections.Generic;

namespace GoodsInvoicing.BLL.ServiceImpl
{
    /// <summary>
    /// 表[GI_Menu]的Service实现类
    /// </summary>
    public class GI_MenuService : IGI_MenuService
    {
        private GI_MenuDAO _MenuDAO;
        public GI_MenuDAO GI_MenuDAO
        {
            get { return _MenuDAO; }
            set { _MenuDAO = value; }
        }
        public GI_Menu Get(int id)
        {
            return _MenuDAO.Get(id);
        }
        public IList<GI_Menu> GetAll()
        {
            return _MenuDAO.GetAll();
        }
        public int Save(GI_Menu entity)
        {
            return _MenuDAO.Save(entity);
        }
        public void Update(GI_Menu entity)
        {
            _MenuDAO.Update(entity);
        }
        public void Delete(GI_Menu entity)
        {
            _MenuDAO.Delete(entity);
        }


        public IDictionary<GI_Menu, IList<GI_Menu>> GetMenus(string loginName)
        {
            IDictionary<GI_Menu, IList<GI_Menu>> menus = _MenuDAO.GetMenus(loginName);
            return menus;
        }
    }
}
